NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;

function expandIt(index) {
	var menuitem = new Array();
	alert("111111111111111");
	menuitem[1] = document.getElementById("questionChild");
	alert(menuitem[1]);
	alert("222222222222222222");
	menuitem[2] = document.getElementById("studentChild");
	alert("3333333333333");

	// 对id＝树的父节点进行操作
	if (menuitem[index].style.display == "block") {
		alert("4444444444444444444");
		displayall()
	} else {
		alert(menuitem[index].style.display);
		alert("5555555555555555555");
		displayall()
		menuitem[index].style.display = "block"
	}
}

function displayall() {

	alert("666666666666666");
	document.getElementById("questionChild").style.display = "none";
	alert(document.getElementById("questionChild").style.display);
	document.getElementById("abc").style.display = "none";
	alert("7777777777777777");
	document.getElementById("studentChild").style.display = "none";
	alert("8888888888888888888");
}
function arrange() {
	nextY = document.layers[firstInd].pageY
			+ document.layers[firstInd].document.height;
	for (i = firstInd + 1; i < document.layers.length; i++) {
		whichEl = document.layers[i];
		if (whichEl.visibility != "hide") {
			whichEl.pageY = nextY;
			nextY += whichEl.document.height;
		}
	}
}
function initIt() {
	if (!ver4)
		return;
	if (NS4) {
		for (i = 0; i < document.layers.length; i++) {
			whichEl = document.layers[i];
			if (whichEl.id.indexOf("Child") != -1)
				whichEl.visibility = "hide";
		}
		arrange();
	} else {
		divColl = document.all.tags("DIV");// 在IE下找到“DIV”tag，然后对className =
											// “child”的tag进行操作
		for (i = 0; i < divColl.length; i++) {
			whichEl = divColl(i);
			if (whichEl.className == "child")
				whichEl.style.display = "none";
		}
	}
}
onload = initIt;// 初始化使“树”处于“合”的状态
